package com.user.controller;

import com.aaa.util.Result;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.user.entity.TabUser;
import com.user.service.ITabUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xyw
 * @since 2023-08-09
 */
@RestController
@RequestMapping("/tab-user")
public class TabUserController {

    @Resource
    private ITabUserService userService;

    @GetMapping("/getUser")
    public Result queryAll(Integer currentPage, Integer pageSize, @ModelAttribute TabUser user){
        Page allUser = userService.getAllUser(currentPage, pageSize, user);
        return Result.success(allUser);
    }
}
